package com.boesch.electroOffice.dataaccess.dao;

import java.util.List;

import com.boesch.electroOffice.dataaccess.common.IllegalDataAccessException;
import com.boesch.electroOffice.model.electroOffice.Tool;

/**
 * This interface allocates all methods for class ToolsDaoImpl.
 * The methods are only called by the business layer.
 * If there is an error on executing the method, a illegalDataAccessException will be thrown.
 * 
 * @author Ralph Koster
 *
 */
public interface ToolsDao {

	/**
	 * Creates a new tool object.
	 * Complete Javadoc
	 * 
	 * @param Tool tool
	 * @return String returnValue
	 * @throws IllegalDataAccessException e
	 */
	public String createTool(Tool tool) throws IllegalDataAccessException;

	/**
	 * Reads a tool object by its toolId.
	 * Complete Javadoc
	 * 
	 * @param int toolId
	 * @return Tool tool
	 * @throws IllegalDataAccessException e
	 */
	public Tool readToolByToolId(int toolId) throws IllegalDataAccessException;

	/**
	 * Reads a tool object by its internalNumber.
	 * Complete Javadoc
	 * 
	 * @param String internalNumber
	 * @return Tool tool
	 * @throws IllegalDataAccessException e
	 */
	public Tool readToolByInternalNumber(String internalNumber) throws IllegalDataAccessException;

	/**
	 * Reads a tool object by its entity and identifier
	 * Complete Javadoc
	 * 
	 * @param String entity
	 * @param String identifier
	 * @return Tool tool
	 * @throws IllegalDataAccessException e
	 */
	public Tool readToolByEntityAndIdentifier(String entity, String identifier) throws IllegalDataAccessException;

	/**
	 * Returns a list of all Tool objects.
	 * Complete Javadoc
	 * 
	 * @return List<Tool> tools
	 * @throws IllegalDataAccessException e
	 */
	public List<Tool> readTools() throws IllegalDataAccessException;

	/**
	 * Returns a list of Tool objects by its entity.
	 * Complete Javadoc
	 * 
	 * @param String entity
	 * @return List<Tool> tools
	 * @throws IllegalDataAccessException e
	 */
	public List<Tool> readToolsByEntity(String entity) throws IllegalDataAccessException;

	/**
	 * Updates a Tool object.
	 * Complete Javadoc
	 * 
	 * @param Tool tool
	 * @return String returnValue
	 * @throws IllegalDataAccessException e
	 */
	public String updateTool(Tool tool) throws IllegalDataAccessException;

	/**
	 * Updates a Tool object on the basis of its toolId.
	 * Complete Javadoc
	 * 
	 * @param int toolId
	 * @return String returnValue
	 * @throws IllegalDataAccessException e
	 */
	public String deleteToolByToolId(int toolId) throws IllegalDataAccessException;

	/**
	 * Updates a Tool object on the basis of its internalNumber.
	 * Complete Javadoc
	 * 
	 * @param String internalNumber
	 * @return String returnValue
	 * @throws IllegalDataAccessException e
	 */
	public String deleteToolByInternalNumber(String internalNumber) throws IllegalDataAccessException;

	/**
	 * Updates a Tool object on the basis of its entity and identifier.
	 * Complete Javadoc
	 * 
	 * @param String entity
	 * @param String identifier
	 * @return String returnValue
	 * @throws IllegalDataAccessException e
	 */
	public String deleteToolByEntityAndIdentifier(String entity, String identifier) throws IllegalDataAccessException;
}
